package com.marvels.dubbo.coreservice.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.dragon.loan.entity.StrategyResponse;
import com.marvels.common.utils.MarvelsLogUtil;
import com.marvels.dubbo.coreservice.service.DecisionExecuteDubboService;
@RestController
@RequestMapping("dubbo/decision/api")
public class DecisionExecuteController {
	@Autowired
	private DecisionExecuteDubboService decisionExecuteDubboService;
	
	@RequestMapping("getDecisionResult")
	public StrategyResponse getDecisionResult(String loanId,String productType) {
		try {
			StrategyResponse response = decisionExecuteDubboService.getDecisionResult(loanId, productType);
			return response;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("getDecisionResult##############",e);
			return null;
		}
	}
	
}
